﻿using Microsoft.EntityFrameworkCore;
using Abp.Zero.EntityFrameworkCore;
using shenghua.Authorization.Roles;
using shenghua.Authorization.Users;
using shenghua.MultiTenancy;
using System.Data.EntityClient;

namespace shenghua.EntityFrameworkCore
{
    public class shenghuaDbContext : AbpZeroDbContext<Tenant, Role, User, shenghuaDbContext>
    {
        /* Define a DbSet for each entity of the application */

        public virtual DbSet<Basics.Areas.Area> Areas { get; set; }
        public virtual DbSet<Basics.CommodityClasses.CommodityClass> CommodityClasses { get; set; }
        public virtual DbSet<Basics.ShoppingOptionParameters.ShoppingOptionParameter> ShoppingOptionParameters { get; set; }
        public virtual DbSet<Basics.CommoditySpecificationParameters.CommoditySpecificationParameter> CommoditySpecificationParameters { get; set; }
        public virtual DbSet<Basics.CommodityWares.CommodityWare> CommodityWares { get; set; }
        public virtual DbSet<Basics.Feedbacks.Feedback> Feedbacks { get; set; }
        public virtual DbSet<Basics.FriendlyLinks.FriendlyLink> FriendlyLinks { get; set; }
        public virtual DbSet<Basics.Guarantees.Guarantee> Guarantees { get; set; }
        public virtual DbSet<Basics.MemberFormItems.MemberFormItem> MemberFormItems { get; set; }
        public virtual DbSet<Basics.MemberGroups.MemberGroup> MemberGroups { get; set; }
        public virtual DbSet<Basics.MemberLevels.MemberLevel> MemberLevels { get; set; }
        public virtual DbSet<Basics.ShippingTemplates.ShippingTemplate> ShippingTemplates { get; set; }
        public virtual DbSet<Basics.FileSystem.FileItem> FileItems { get; set; }
        public virtual DbSet<Basics.ShippingAddresses.AdminShippingAddress> AdminShippingAddresses { get; set; }
        public virtual DbSet<Basics.CommodityGuarantees.CommodityGuarantee> CommodityGuarantees { get; set; }

        public virtual DbSet<Commodity.Commodities.Commodity> Commodities { get; set; }
        public virtual DbSet<Commodity.Commodities.CommodityEvaluate> CommodityEvaluates { get; set; }
        public virtual DbSet<Commodity.Commodities.CommodityShoppingOption> CommodityShoppingOptions { get; set; }

        public virtual DbSet<Marketing.Coupons.Coupon> Coupons { get; set; }
        public virtual DbSet<Marketing.Coupons.GrantCouponLog> GrantCouponLogs { get; set; }
        public virtual DbSet<Marketing.SalesPromotions.SalesPromotion> SalesPromotions { get; set; }

        public virtual DbSet<Common.Articles.Article> Articles { get; set; }
        public virtual DbSet<Common.Articles.ArticleComment> ArticleComments { get; set; }
        public virtual DbSet<Common.BankCards.BankCard> BankCards { get; set; }
        public virtual DbSet<Common.FreeValues.FreeValue> FreeValues { get; set; }

        public virtual DbSet<Member.Collection.CollectionCommodity> CollectionCommodities { get; set; }
        public virtual DbSet<Member.Coupons.MemberCoupon> MemberCoupons { get; set; }
        public virtual DbSet<Member.Members.Member> Members { get; set; }
        public virtual DbSet<Member.Members.MemberBankCard> MemberBankCards { get; set; }
        public virtual DbSet<Member.ShoppingCart.ShoppingCartCommodity> ShoppingCartCommodities { get; set; }
        public virtual DbSet<Member.ShippingAddresses.MemberShippingAddress> MemberShippingAddresses { get; set; }
        public virtual DbSet<Member.XP.XPLog> XPLogs { get; set; }

        public virtual DbSet<Order.Orders.Order> Orders { get; set; }
        public virtual DbSet<Order.Orders.OrderDetail> OrderDetails { get; set; }
        public virtual DbSet<Order.Orders.OrderLog> OrderLogs { get; set; }
        public virtual DbSet<Order.Orders.OrderEvaluate> OrderEvaluates { get; set; }
        public virtual DbSet<Order.Refunds.Refund> Refunds { get; set; }

        public virtual DbSet<Payment.Payments.PaymentLog> PaymentLogs { get; set; }


        public shenghuaDbContext(DbContextOptions<shenghuaDbContext> options)
            : base(options)
        {
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
        }
    }
}
